package com.bajiao.common.exception;

public class DataHandleException extends RuntimeException {
	private static final long serialVersionUID = 1L;

	private Integer code;

	private Object data;

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public Object getData() {
		return data;
	}

	public DataHandleException setData(Object data) {
		this.data = data;
		return this;
	}

	public DataHandleException(Throwable cause)
	{
		super(cause);
	}

	public DataHandleException(String message, Throwable cause)
	{
		super(message,cause);
	}

	public DataHandleException(String message, Integer code) {
		super(message);
		this.code = code;
	}

	public DataHandleException(String message, Integer code,Object data) {
		super(message);
		this.code = code;
		this.data = data;
	}

	public DataHandleException(String message) {
		super(message);
		this.code = 0;
	}
}
